<? include"../koneksi/koneksi.php"; ?>
<? include ("../lib/inc_kdauto.php");?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style type="text/css"></style>
<link href="../lib/styles.css" rel="stylesheet" type="text/css">
<link href="../lib/tbl_css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style28 {color: #FFFFFF; }
-->
</style>
<script type="text/JavaScript">
<!--




function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
</head>

<body onload="MM_preloadImages('../gambar/tambah01.gif')">
<? 
$no_training=$_GET[no_training];
$kd_seksi=$_GET[kd_seksi];	
 ?>
<TABLE width=100% border=0 align="center" cellPadding=0 cellSpacing=0>
        <TBODY>
        <TR vAlign=top>
          <TD style="BACKGROUND: url(../gambar/gri_sus.gif) repeat-x" height=50 
          width=100% colSpan=2><table width="100%" height="15" border="0">
            <tr>
              <td height="35" background="../gambar/index_07.jpg"><H6 class=title title="Detail Karyawan">Daftar Training Karyawan</H6></td>
            </tr>
          </table></TD>
        </TR>
        <TR>
          <TD width=788 colSpan=3>
            <TABLE border=0 cellSpacing=0 cellPadding=0 width=100%>
              <TBODY>
              <TR>
                <TD><IMG border=0 alt=space 
                  src="../gambar/spacer.gif" 
                  width=1 height=1></TD></TR>
              <TR>
                <TD 
                width=788 colSpan=2 
                style="BACKGROUND: url(../images/shadow_sub_verde.gif) #f4f4f4 repeat-x">
                  <TABLE border=0 cellSpacing=0 cellPadding=0 width=788>
                    <TBODY>
                    <TR>
                      <TD width="36" rowspan="2" valign="top">&nbsp;&nbsp;<img src="../gambar/001_21.png" width="24" height="24"><IMG alt=space 
                        src="../gambar/spacer.gif" 
                        width=1 height=10></TD>
                      <TD width="752" valign="top"><a href="?act=training_ok"><span class="linkuri_bottom2">Kembali</span></a></TD>
                    </TR>
                    <TR>
                      <TD>&nbsp;</TD>
                </TR></TBODY></TABLE></TD>
              </TR>
              <TR>
            <TD><IMG border=0 alt=space 
                  src="../gambar/spacer.gif" 
                  width=1 height=5></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><a href="index.php?act=in_matkul"></a></h2></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table> 
	

<table width="95%" border="1" align="center" style="border-collapse: collapse;" bordercolor="#cccccc">
  <tr bgcolor="#660066" class="FOOTWARNA">
    <td width="9%" id="tdUp"><div align="center" class="style28">No</div></td>
    <td width="9%" id="tdUp"><div align="center" class="style28">NIK</div></td>
    <td width="25%" id="tdUp"><div align="center" class="style28">Karyawan</div></td>
    <td width="18%" id="tdUp"><div align="center" class="style28">Seksi</div></td>
    <td width="17%" id="tdUp"><div align="center" class="style28">Tanggal Training</div></td>
    </tr>
  <tr>
<? include"../koneksi/koneksi.php";
 $limit=15;
 if(empty($halaman)){
 $offset=0;
 $halaman=1;}
 else{
 $offset=($halaman-1) * $limit; }
 
$lihat=mysql_query("select * from karyawan k, seksi s, detail_training dt,training t
					where dt.nik=k.nik and k.kd_seksi=s.kd_seksi and dt.no_training=t.no_training and dt.no_training='$no_training'
					limit $offset,$limit");
 while($hs=mysql_fetch_array($lihat))
 {
 	if($j==0){
	echo"<tr id='tampil'>";
	$j++;}
	else{
	echo"<tr id='tampil2'>";
	$j--;}
	$no++;
?> 



    <td><div align="center"><? echo"$no"; ?></div></td>
    <td><div align="center"><? echo"$hs[nik]"; ?></div></td>
    <td><div align="center"><? echo"$hs[nm_karyawan]"; ?></div></td>
    <td><div align="center"><? echo"$hs[nm_seksi]"; ?></div>
      <div align="center"></div></td>
    <td><div align="center"><? echo"$hs[tgl_training]"; ?></div></td>
    </tr>
  <? } ?>
</table>

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="style12">
  <tr>
    <td><?
$lihat2=mysql_query("select * from karyawan k, seksi s, detail_training dt,training t
					where dt.nik=k.nik and k.kd_seksi=s.kd_seksi and dt.no_training=t.no_training and dt.no_training='$no_training'
					");
$jumbaris=mysql_num_rows($lihat2);
$total_halaman=ceil($jumbaris/$limit);

if(!empty($halaman) && $halaman!=1)
	{
	$previous=$halaman-1;
	echo"<a href=?act=training&halaman=$previous>Previous</a> -";
	}
	else{
	echo"Previous -";
	}

for($i=1;$i<=$total_halaman;$i++)
if($i!=$halaman)
	{
	echo"<a href=?act=training&halaman=$i>$i</a> -";
	}
	else{
	echo"$i -"; }

if($halaman<$total_halaman)
	{
	$next=$halaman+1;
	echo"<a href=?act=training&halaman=$next>Next</a>";
	echo"<center>Jumlah Data : $jumbaris</center>"; }
	else{
	echo"Next";
	echo"<center>Jumlah Data : $jumbaris</center>"; }
?>
    </td>
  </tr>
</table>
	
	</td>
  </tr>
  <tr>
    <td><p>&nbsp;</p></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
